package com.whfc.ms.api.emp.service.impl;

import com.whfc.common.result.ListData;
import com.whfc.common.result.PageData;
import com.whfc.emp.dto.*;
import com.whfc.emp.service.AppEmpDataAnaService;
import com.whfc.ms.api.emp.service.MsAppEmpDataAnaService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @ClasssName MsAppEmpDataAnaServiceImpl
 * @Description 数据分析
 * @Author hw
 * @Date 2020/12/30 9:56
 * @Version 1.0
 */
@Service
public class MsAppEmpDataAnaServiceImpl implements MsAppEmpDataAnaService {

    @DubboReference(interfaceClass = AppEmpDataAnaService.class, version = "1.0.0")
    private AppEmpDataAnaService appEmpDataAnaService;

    @Override
    public AppEmpDataDTO getEmpData(Integer deptId) {
        return appEmpDataAnaService.getEmpData(deptId);
    }

    @Override
    public PageData<AppAnaEmpDTO> getRecentAttendEmp(Integer deptId) {
        return appEmpDataAnaService.getRecentAttendEmp(deptId);
    }

    @Override
    public PageData<AppAnaEmpDTO> getRecentEnterEmp(Integer deptId) {
        return appEmpDataAnaService.getRecentAttendEmp(deptId);
    }

    @Override
    public AppEmpStatisticsDTO getGroupEmp(Integer deptId) {
        return appEmpDataAnaService.getGroupEmp(deptId);
    }

    @Override
    public AppEmpStatisticsDTO getCorpEmp(Integer deptId) {
        return appEmpDataAnaService.getCorpEmp(deptId);
    }

    @Override
    public AppEmpStatisticsDTO getWorkEmp(Integer deptId) {
        return appEmpDataAnaService.getWorkEmp(deptId);
    }

    @Override
    public ListData<AppEmpAttendGroupDTO> getWordDayAttendData(Integer deptId, Date date) {
        List<AppEmpAttendGroupDTO> list = appEmpDataAnaService.getWordDayAttendData(deptId, date);
        return new ListData<>(list);
    }

    @Override
    public AppEmpLogDTO empLog(Integer deptId, Date date) {
        return appEmpDataAnaService.getEmpLog(deptId, date);
    }

    @Override
    public AppEmpSpotDataDTO getSpotEmpData(Integer deptId) {
        return appEmpDataAnaService.getSpotEmpData(deptId);
    }
}
